package com.wufeng.mapper;

import com.wufeng.entity.Reply;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
* @author Hxh
* @description 针对表【reply】的数据库操作Mapper
* @createDate 2023-12-19 21:39:01
* @Entity com.wufeng.entity.Reply
*/
public interface ReplyMapper extends BaseMapper<Reply> {


    @Update("UPDATE reply SET likeCount = likeCount + 1 WHERE replyId = #{replyid}")
    void incrementLikeCount(Integer replyid);

    @Update("UPDATE reply SET likeCount = likeCount - 1 WHERE replyId = #{replyid}")
    void decrementLikeCount(Integer replyid);
}




